{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "content": "## - Automation Expert & n8n Creator\n\nI am a passionate automation expert and recognized n8n Creator specializing in intelligent workflow automation. With extensive experience in n8n, AI automation, Zapier, and Make.com, I have created innovative workflow templates with 500+ downloads across the global automation community\n\n### Expertise\n- **Workflow Automation**: n8n, Zapier, Make.com, AI automation\n- **AI Integration**: Gemini AI, API integration, data processing\n- **Platform Mastery**: Google Sheets, Google Drive, custom scripts\n\n## Need Help with This Workflow?\n\nIf you face any issues with this workflow or need customization support, feel free to reach out:\n",
        "height": 640,
        "width": 528,
        "color": 5
      },
      "id": "48513d60-8426-47df-9e9e-9303d3541e5a",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -304
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bc74b0c2-aa46-4bcd-91f3-1eb6b0720167",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "pending"
            }
          ]
        },
        "options": {}
      },
      "id": "372aefe3-50f1-448e-a9d2-e61d035290d6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        -304
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {},
      "id": "1756360a-07dc-4921-825f-0f1a762c94e0",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1200,
        -320
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are an expert AI prompt writer specializing in creating vivid, photorealistic image generation prompts. You will be given a simple title and your task is to create a detailed, artistic prompt for an image of nail polish on a woman's hand based on that title.\n\nYour generated prompt should:\n1. Describe a specific nail color, shape, and finish (e.g., glossy, matte, chrome).\n2. Include details about a natural, realistic hand pose and its interaction with an object or environment.\n3. Specify the lighting conditions (e.g., golden hour, studio light, moody).\n4. Set a clear mood or atmosphere.\n5. Conclude with 'Aspect Ratio: 9:16'.\n\n\nImportant formatting requirements for your final output:\n- The entire response must be a single JSON object.\n- The JSON object must have a 'title' key (which should be the original input title you were given) and a 'post' key (which contains your detailed generated prompt).\n- Ensure the text in the JSON values is properly escaped.\n- Do not use double quotes ('') inside the JSON string values; use single quotes (') instead if needed.\n- Do not use asterisks.\n\n\nNow, create a detailed prompt based on the following title:\n{{ $json['Input Title'] }}\n\n\nRespond only with a JSON object in exactly this format:\n{\n  \"title\": \"{{ $json.prompt }}\",\n  \"post\": \"<your detailed and artistic nail polish prompt here>\"\n}",
        "hasOutputParser": true,
        "options": {}
      },
      "id": "60cfdec7-df14-4dbf-bbdf-a0f14d16acab",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        592,
        -128
      ],
      "typeVersion": 1.8
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst updatedItems = items.map((item) => {\n  if (\n    item.json &&\n    item.json.output &&\n    typeof item.json.output.post === \"string\"\n  ) {\n    item.json.output.post = item.json.output.post.replace(/\\n/g, \"\\\\n\");\n  }\n  return item;\n});\nreturn updatedItems;"
      },
      "id": "a1dc18c5-83f1-4ea3-bf56-bd87dcfcf51d",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        -128
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"title\": { \"type\": \"string\" },\n    \"post\":  { \"type\": \"string\" }\n  },\n  \"required\": [\"title\",\"post\"],\n  \"additionalProperties\": false\n}\n"
      },
      "id": "cfb1ddb4-730e-467c-9b16-46f5c437b2ee",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        720,
        48
      ],
      "typeVersion": 1.3
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "656011e3-f6d7-4da2-8cdd-8c9376e1e7fc",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        576,
        48
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.0-flash-exp-image-generation",
          "cachedResultName": "models/gemini-2.0-flash-exp-image-generation"
        },
        "prompt": "=Create a high-quality, visually engaging image for a social media post based on the following text:\n\n\"{{ $json.output.post }}\"\n",
        "options": {}
      },
      "id": "5601d9b9-f389-41b7-abb4-0138cb9be975",
      "name": "Generate Image with Gemini",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1120,
        -128
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "name": "=w_{{ $('Get row(s) in sheet').item.json.ID }}.{{$binary.data.fileExtension || 'png'}}\n",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "16w6uMS_eMimiMCP1L2tQniPxhGwSeTcO",
          "cachedResultUrl": "https://drive.google.com/drive/folders/16w6uMS_eMimiMCP1L2tQniPxhGwSeTcO",
          "cachedResultName": "wallpaper images"
        },
        "options": {}
      },
      "id": "5c595e73-c279-4494-9c89-7d04a73447c4",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        896,
        112
      ],
      "typeVersion": 3
    },
    {
      "parameters": {
        "operation": "share",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        },
        "options": {}
      },
      "id": "d730034d-2a63-4ab8-a1ce-3901e3a164af",
      "name": "Share file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1040,
        112
      ],
      "typeVersion": 3
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g",
          "cachedResultUrl": "https://docs.google.YOUR_AWS_SECRET_KEY_HERE_YHI1PFFghFj9R4kBfJNh9g/edit?usp=drivesdk",
          "cachedResultName": "n8n wallpaper"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.YOUR_AWS_SECRET_KEY_HERE_YHI1PFFghFj9R4kBfJNh9g/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "value": {
            "ID": "={{ $('If').item.json.ID }}",
            "status": "posted",
            "imageUrl": "={{$node[\"Upload file\"].json.webViewLink}}"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "imageUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "imageUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "b731d745-9685-4a39-bf5e-92b848cf2317",
      "name": "update imageUrl",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1184,
        112
      ],
      "typeVersion": 4.7
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 1
            }
          ]
        }
      },
      "id": "4c0870a1-3505-44ea-8277-f13111ea7399",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        560,
        -304
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g",
          "cachedResultUrl": "https://docs.google.YOUR_AWS_SECRET_KEY_HERE_YHI1PFFghFj9R4kBfJNh9g/edit?usp=drivesdk",
          "cachedResultName": "n8n wallpaper"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.YOUR_AWS_SECRET_KEY_HERE_YHI1PFFghFj9R4kBfJNh9g/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "options": {}
      },
      "id": "2c3f00cd-36e7-403f-8e68-504ace2d180b",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        -304
      ],
      "typeVersion": 4.7
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Generate Image with Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file": {
      "main": [
        [
          {
            "node": "update imageUrl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Share file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image with Gemini": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "10d362eb-5ede-4c95-bce4-c90b3bb61980",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "108ca395ced197c6477117d33be04fdbb054b19068f57471dcf11fcb19567da0"
  },
  "id": "ullZK5zc0t-Q5w-2B_z0n",
  "tags": []
}